Skip to content

Harden OpenVMM Azure guest orchestration#4420

Merged
vyadavmsft merged 5 commits intomainfrom
vyadav_openvmm_test
Apr 29, 2026
Merged

Harden OpenVMM Azure guest orchestration#4420
vyadavmsft merged 5 commits intomainfrom
vyadav_openvmm_test

Conversation

@vyadavmsft
Copy link
Copy Markdown
Collaborator

@vyadavmsft vyadavmsft commented Apr 16, 2026

Description

  • add cloud-init-based provisioning for OpenVMM guests
  • make detached OpenVMM launches more robust and avoid requiring pycdlib at module import time
  • add TAP networking support, guest address resolution, and host-side SSH forwarding
  • improve OpenVMM failure diagnostics for process, network, dnsmasq, and log collection paths
  • harden host working directory and artifact path handling for guest assets
  • add Azure smoke runbook coverage for OpenVMM guest boot, restart, and stop/start scenarios
  • update runner and Azure guest plumbing needed to deploy and initialize OpenVMM guests cleanly
  • extend selftest coverage for launch cwd handling, stop timeout behavior, artifact staging, and schema validation

For Lisa-runner:
schedule guest initialization after host deploy
initialize guest nodes after host connect
allow guest runs to match Deployed against outer Connected
avoid eager delete before retry in guest flow

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:

Tested Azure Marketplace Images:

Test Results

2026-04-15 23:32:50.931[140036611700544][INFO] lisa.RootRunner ________________________________________
2026-04-15 23:32:50.932[140036611700544][INFO] lisa.RootRunner OpenVmmPlatform.verify_openvmm_guest_boot: PASSED
2026-04-15 23:32:50.932[140036611700544][INFO] lisa.RootRunner OpenVmmPlatform.verify_openvmm_restart_via_platform: PASSED

Image VM Size Result
PASSED

Copilot AI review requested due to automatic review settings April 16, 2026 19:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the OpenVMM guest orchestrator flow when used as an Azure “guest-enabled” environment, adding cloud-init provisioning support, TAP networking/SSH forwarding, richer diagnostics, and smoke coverage to validate guest lifecycle operations.

Changes:

  • Add cloud-init ISO generation and provisioning plumbing for OpenVMM guests, with improved failure-context capture.
  • Add TAP networking support (dnsmasq DHCP, guest address resolution, host-side SSH port forwarding) and teardown/cleanup paths.
  • Update runner/Azure plumbing to better handle guest-enabled environments, plus OpenVMM smoke suite + Azure runbook, and extend selftests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
selftests/test_openvmm_node.py Updates selftests for stop-timeout behavior and logging expectations.
lisa/tools/openvmm.py Improves detached launch robustness (TTY wrapper) and PID failure diagnostics.
lisa/sut_orchestrator/openvmm/schema.py Extends OpenVMM guest/network schema for cloud-init + TAP/forwarding settings.
lisa/sut_orchestrator/openvmm/node.py Implements TAP networking, cloud-init ISO creation, forwarding, diagnostics, artifact cleanup.
lisa/sut_orchestrator/azure/platform_.py Avoids feature access for guest nodes unless the feature is supported.
lisa/runners/lisa_runner.py Adds guest-environment initialization and environment-status matching for guest-enabled runs.
lisa/node.py Ensures host nodes clean up/close guest nodes; relaxes connection test when shell is missing.
lisa/microsoft/testsuites/openvmm/openvmm.py Adds OpenVMM Azure smoke coverage for boot/restart/stop-start scenarios.
lisa/microsoft/runbook/openvmm/openvmm-azure-smoke.yml New Azure smoke runbook for OpenVMM guest validation with TAP+forwarding.

Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/tools/openvmm.py
Comment thread lisa/node.py
Comment thread lisa/microsoft/testsuites/openvmm/openvmm.py Outdated
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 5
❌ Failed 0
⏭️ Skipped 0
Total 5
Test case details
Test Case Status Time (s) Message
verify_serial_console (lisa_0_0) ✅ PASSED 39.223
verify_stop_start_in_platform (lisa_0_2) ✅ PASSED 109.779
verify_reboot_in_platform (lisa_0_1) ✅ PASSED 45.190
verify_openvmm_restart_via_platform (lisa_0_3) ✅ PASSED 48.123
verify_openvmm_stop_start_in_platform (lisa_0_4) ✅ PASSED 79.704

@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 6dc110d to 08cd8b1 Compare April 16, 2026 19:56
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 5
❌ Failed 0
⏭️ Skipped 0
Total 5
Test case details
Test Case Status Time (s) Message
verify_reboot_in_platform (lisa_0_1) ✅ PASSED 43.708
verify_stop_start_in_platform (lisa_0_2) ✅ PASSED 78.755
verify_openvmm_restart_via_platform (lisa_0_3) ✅ PASSED 47.626
verify_openvmm_stop_start_in_platform (lisa_0_4) ✅ PASSED 321.686
verify_serial_console (lisa_0_0) ✅ PASSED 49.183

Copilot AI review requested due to automatic review settings April 16, 2026 20:18
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 08cd8b1 to 9d5c64b Compare April 16, 2026 20:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread lisa/tools/openvmm.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 2
Total 5
Test case details
Test Case Status Time (s) Message
verify_openvmm_restart_via_platform (lisa_0_3) ⏭️ SKIPPED 5.163 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_stop_start_in_platform (lisa_0_4) ⏭️ SKIPPED 5.220 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_stop_start_in_platform (lisa_0_2) ✅ PASSED 94.921
verify_reboot_in_platform (lisa_0_1) ✅ PASSED 197.354
verify_serial_console (lisa_0_0) ✅ PASSED 42.420

Copilot AI review requested due to automatic review settings April 16, 2026 20:41
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 2
Total 5
Test case details
Test Case Status Time (s) Message
verify_openvmm_stop_start_in_platform (lisa_0_4) ⏭️ SKIPPED 3.951 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_restart_via_platform (lisa_0_3) ⏭️ SKIPPED 4.602 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_reboot_in_platform (lisa_0_1) ✅ PASSED 45.059
verify_stop_start_in_platform (lisa_0_2) ✅ PASSED 81.295
verify_serial_console (lisa_0_0) ✅ PASSED 39.162

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Comment thread lisa/node.py Outdated
Comment thread lisa/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch 2 times, most recently from 6f94f54 to c2a279c Compare April 16, 2026 21:00
@github-actions
Copy link
Copy Markdown

⏭️ AI Test Selection — SKIPPED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Selected test cases
verify_openvmm_restart_via_platform
verify_openvmm_stop_start_in_platform
verify_serial_console
verify_reboot_in_platform
verify_stop_start_in_platform

@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 2
Total 5
Test case details
Test Case Status Time (s) Message
verify_openvmm_stop_start_in_platform (lisa_0_4) ⏭️ SKIPPED 3.685 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_restart_via_platform (lisa_0_3) ⏭️ SKIPPED 5.537 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_serial_console (lisa_0_0) ✅ PASSED 49.632
verify_reboot_in_platform (lisa_0_1) ✅ PASSED 46.117
verify_stop_start_in_platform (lisa_0_2) ✅ PASSED 79.773

Copilot AI review requested due to automatic review settings April 16, 2026 21:42
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from c2a279c to 1f2096c Compare April 16, 2026 21:42
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

5 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 2
Total 5
Test case details
Test Case Status Time (s) Message
verify_reboot_in_platform (lisa_0_1) ✅ PASSED 46.732
verify_stop_start_in_platform (lisa_0_2) ✅ PASSED 86.359
verify_openvmm_stop_start_in_platform (lisa_0_4) ⏭️ SKIPPED 5.302 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_restart_via_platform (lisa_0_3) ⏭️ SKIPPED 5.109 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_serial_console (lisa_0_0) ✅ PASSED 44.375

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/context.py
Comment thread lisa/tools/dnsmasq.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
@LiliDeng LiliDeng requested a review from anirudhrb April 17, 2026 05:03
@LiliDeng LiliDeng requested a review from pupacha April 17, 2026 05:03
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 1f2096c to 12687a4 Compare April 17, 2026 22:42
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 2
Total 3
Test case details
Test Case Status Time (s) Message
verify_openvmm_stop_start_in_platform (lisa_0_2) ⏭️ SKIPPED 6.086 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_restart_via_platform (lisa_0_1) ⏭️ SKIPPED 5.309 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_serial_console (lisa_0_0) ✅ PASSED 42.755

Copy link
Copy Markdown
Collaborator

@anirudhrb anirudhrb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been able to go through the whole code yet. Here are some comments from the first pass. I'll do another pass tomorrow.

Comment thread lisa/microsoft/testsuites/openvmm/openvmm.py Outdated
Comment thread lisa/microsoft/testsuites/openvmm/openvmm.py
Comment thread lisa/microsoft/testsuites/openvmm/openvmm.py Outdated
Comment thread lisa/microsoft/testsuites/openvmm/openvmm.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Copilot AI review requested due to automatic review settings April 20, 2026 21:03
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 12687a4 to 4ad8f7c Compare April 20, 2026 21:03
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 2
Total 3
Test case details
Test Case Status Time (s) Message
verify_openvmm_restart_via_platform (lisa_0_1) ⏭️ SKIPPED 0.000 capability cannot support some of requirements, requirement: 'allowed:True,items:[azure]'capability: 'allowed:True,items
verify_openvmm_stop_start_in_platform (lisa_0_2) ⏭️ SKIPPED 0.000 capability cannot support some of requirements, requirement: 'allowed:True,items:[azure]'capability: 'allowed:True,items
verify_serial_console (lisa_0_0) ✅ PASSED 46.129

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread lisa/sut_orchestrator/openvmm/node.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/node.py
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 4ad8f7c to fd3f118 Compare April 20, 2026 21:16
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 2
Total 3
Test case details
Test Case Status Time (s) Message
verify_openvmm_restart_via_platform (lisa_0_1) ⏭️ SKIPPED 0.000 capability cannot support some of requirements, requirement: 'allowed:True,items:[azure]'capability: 'allowed:True,items
verify_openvmm_stop_start_in_platform (lisa_0_2) ⏭️ SKIPPED 0.000 capability cannot support some of requirements, requirement: 'allowed:True,items:[azure]'capability: 'allowed:True,items
verify_serial_console (lisa_0_0) ✅ PASSED 47.183

Copilot AI review requested due to automatic review settings April 21, 2026 00:32
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from fd3f118 to 51d33c6 Compare April 21, 2026 00:32
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

3 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 2
Total 3
Test case details
Test Case Status Time (s) Message
verify_openvmm_restart_via_platform (lisa_0_1) ⏭️ SKIPPED 5.013 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_stop_start_in_platform (lisa_0_2) ⏭️ SKIPPED 5.447 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_serial_console (lisa_0_0) ✅ PASSED 71.185

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Comment thread lisa/tools/openvmm.py
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/sut_orchestrator/openvmm/node.py
Comment thread lisa/runners/lisa_runner.py
Comment thread lisa/sut_orchestrator/openvmm/schema.py Outdated
Comment thread lisa/sut_orchestrator/openvmm/schema.py
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 51d33c6 to 362a68d Compare April 22, 2026 01:15
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

2 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 2
Total 2
Test case details
Test Case Status Time (s) Message
verify_openvmm_restart_via_platform (lisa_0_0) ⏭️ SKIPPED 5.220 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_stop_start_in_platform (lisa_0_1) ⏭️ SKIPPED 5.300 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.

vyadavmsft and others added 2 commits April 21, 2026 18:39
Add an Azure smoke runbook and OpenVMM smoke suite that exercise guest boot,
restart, and stop/start on a prepared host.

Describe the LisaRunner guest-enabled flow explicitly:
- schedule environment initialization when the outer environment reaches Deployed
- initialize guest nodes after the outer environment connects
- allow guest-targeted tests that require Deployed to run once the outer host is Connected
- keep retry on the runner redeploy path instead of eagerly deleting the environment

Also wire the Azure/OpenVMM guest handling, schema updates, diagnostics, and
selftest coverage needed for this flow.

(cherry picked from commit ac4c15c)
Make guest teardown best-effort so parent node cleanup and close continue even when a guest cleanup path fails.

Tighten OpenVMM host-side handling by using host-native paths for copied artifacts, validating whoami before TAP creation, guarding working directory deletion, scoping dnsmasq state to the OpenVMM interface, and restoring the original ip_forward state when SSH forwarding is torn down.

Also update the launcher wrapper to return the real OpenVMM PID so later liveness checks and forced cleanup target the VM process rather than the wrapper shell.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vyadavmsft vyadavmsft force-pushed the vyadav_openvmm_test branch from 362a68d to 90912f1 Compare April 22, 2026 01:41
@github-actions
Copy link
Copy Markdown

✅ AI Test Selection — PASSED

2 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 2
Total 2
Test case details
Test Case Status Time (s) Message
verify_openvmm_restart_via_platform (lisa_0_0) ⏭️ SKIPPED 5.783 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.
verify_openvmm_stop_start_in_platform (lisa_0_1) ⏭️ SKIPPED 6.065 before_case skipped: This suite only applies to OpenVMM guest nodes. Actual node type: RemoteNode.

@vyadavmsft vyadavmsft requested a review from anirudhrb April 22, 2026 21:34
Comment thread lisa/runners/lisa_runner.py
Comment thread lisa/microsoft/testsuites/openvmm/openvmm.py
Copy link
Copy Markdown
Collaborator

@anirudhrb anirudhrb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minus the lisa_runner.py and azure platform changes. I don't know enough about those.

@vyadavmsft vyadavmsft merged commit 96869b7 into main Apr 29, 2026
61 checks passed
@vyadavmsft vyadavmsft deleted the vyadav_openvmm_test branch April 29, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants